package tk.jfree.example.solr.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.annotation.Id;
import org.springframework.data.solr.core.mapping.SolrDocument;

import java.io.Serializable;

/**
 * @author Cheng.Wei
 * @date 2019/04/28 22:58
 */
@Getter
@Setter
@ToString
@ApiModel
@SolrDocument(collection = "article")
public class Article implements Serializable {
    private static final long serialVersionUID = 4514182689952929834L;
    @Id
    @Field
    @ApiModelProperty(value = "主键")
    private Long id;
    @Field
    private String title;
    @Field
    private String author;
    @Field
    private String content;
}
